[PHP] Resume db.sql downloads from the last saved file size - #591
Closed
adamziel wants to merge 1 commit into
Closed
[PHP] Resume db.sql downloads from the last saved file size#591adamziel wants to merge 1 commit into
adamziel wants to merge 1 commit into
Conversation
Contributor
Pull pipeline performance —
|
| Stage | PR | trunk | Δ | Status | Details |
|---|---|---|---|---|---|
playground-sqlite-db-pull |
9.67 s | 9.83 s | ⚪ -163 ms (-1.7%) | ✓ | condition=db-pull in PHP.wasm runtime=php.wasm 8.3 wp_mysql_parser=enabled mode=lexer native_lexer=verified native_token_stream=WP_MySQL_Native_Token_Stream native_token_count=18 native_parser=selected trunk: condition=db-pull in PHP.wasm runtime=php.wasm 8.3 wp_mysql_parser=enabled mode=lexer native_lexer=verified native_token_stream=WP_MySQL_Native_Token_Stream native_token_count=18 native_parser=selected |
playground-sqlite-db-apply |
3.70 s | 3.73 s | ⚪ -29 ms (-0.8%) | ✓ | condition=db-apply to SQLite in PHP.wasm runtime=php.wasm 8.3 wp_mysql_parser=enabled mode=parser native_lexer=verified native_token_stream=WP_MySQL_Native_Token_Stream native_token_count=18 native_parser=verified native_ast=WP_MySQL_Native_Parser_Node sqlite_driver_parser=verified trunk: condition=db-apply to SQLite in PHP.wasm runtime=php.wasm 8.3 wp_mysql_parser=enabled mode=parser native_lexer=verified native_token_stream=WP_MySQL_Native_Token_Stream native_token_count=18 native_parser=verified native_ast=WP_MySQL_Native_Parser_Node sqlite_driver_parser=verified |
| Total | 13.37 s | 13.56 s | ⚪ -191 ms (-1.4%) |
Numbers carry runner noise; treat single-run deltas as directional, not authoritative.
📈 Trunk performance history — commit-by-commit timeline.
This was referenced Aug 14, 2026
adamziel
force-pushed
the
codex/direct-db-pull-process-boundaries
branch
from
August 14, 2026 12:39
7096470 to
cec2413
Compare
adamziel
force-pushed
the
codex/file-db-pull-durable-resume
branch
4 times, most recently
from
August 14, 2026 12:52
710ae4e to
64c7cde
Compare
adamziel
force-pushed
the
codex/file-db-pull-durable-resume
branch
from
August 14, 2026 12:58
64c7cde to
a73c0b4
Compare
Collaborator
Author
|
Closing this draft. It is being replaced by a smaller target-database checkpoint stack. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
File-backed
db-pullcan now continue from the last file size and source position Reprint saved.Background
Exit code 2 left
db-pullmarkedpartial, but a later process only recognizedin_progressand started over. A hard stop could also leave extra bytes at the end ofdb.sql, or leave the file shorter than the saved source position.This change
Reprint flushes
db.sqlbefore saving its size with the matching source position. A later process removes any bytes written after that saved size, then continues the download. It refuses a missing or shorter file and refuses to change the output mode halfway through the download.Every request asks the server for SQL which drops and recreates each dumped table. After the server finishes,
database-dump.jsonstores the SHA-256 of the completedb.sql.db-applywill not read a file which is still downloading.This is PR 2 of 5: #590 → #591 → #595 → #582 → #607.
Testing
The focused tests cover exit code 2 during database indexing, process death before and after the first saved file size, missing and shortened
db.sql, an output-mode change, and an attempt to apply a download which has not finished.